import 'package:flutter/material.dart';

class ReloadWidget extends StatelessWidget {

  RefreshCallback refreshCallback;

  ReloadWidget({Key key, @required this.refreshCallback}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Center(
      child: InkWell(
        onTap: () {
          if (null != refreshCallback) {
            refreshCallback();
          }
        },
        child: Container(
          height: 200,
            width: 200,
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                Container(
                  child: Image.asset(
                    "images/loadfail.png",
                      width: 160,
                      height: 160,
                    color: Theme.of(context).primaryColor,
                  ),
                ),
                Text('点我重新加载')
              ],
            ),
        ),
      ),
    );
  }

}